package com.fowo.api.model.purchase;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.format.DateTimeFormat;
import com.fowo.api.common.validator.EnumsString;
import java.util.List;
import javax.validation.constraints.*;
import lombok.Data;

/** 采购订单 导入导出辅助模型 */
@Data
public class PurchaseOrderExcelPo {

  @Size(max = 50, message = "采购单号长度不能超过20")
  @ExcelProperty(value = "采购单号")
  private String purchaseOrderCode;

  @NotNull(message = "供应商不能为空")
  @Size(max = 50, message = "供应商长度不能超过20")
  @ExcelProperty(value = "*供应商")
  private String supplierIdSupplierName;

  @ExcelIgnore
  @ExcelProperty(value = "*供应商")
  private Long supplierId;

  @NotNull(message = "仓库不能为空")
  @Size(max = 50, message = "仓库长度不能超过20")
  @ExcelProperty(value = "*仓库")
  private String widName;

  @ExcelIgnore
  @ExcelProperty(value = "*仓库")
  private Long wid;

  @Size(max = 50, message = "联系人长度不能超过20")
  @ExcelProperty(value = "联系人")
  private String contactPerson;

  @Size(max = 50, message = "联系电话长度不能超过20")
  @ExcelProperty(value = "联系电话")
  private String contactNumber;

  @EnumsString(
    value = { "现结", "月结" },
    message = "结算方式的可用值为 “现结”, “月结” 其中之一"
  )
  @Size(max = 50, message = "结算方式长度不能超过20")
  @ExcelProperty(value = "结算方式")
  private String settlementMethod;

  @Size(max = 50, message = "预付比例长度不能超过20")
  @ExcelProperty(value = "预付比例")
  private java.math.BigDecimal advanceRatio;

  @Size(max = 50, message = "结算描述长度不能超过20")
  @ExcelProperty(value = "结算描述")
  private String settlementDescribe;

  @EnumsString(
    value = { "网银转账", "网上支付" },
    message = "支付方式的可用值为 “网银转账”, “网上支付” 其中之一"
  )
  @ExcelProperty(value = "支付方式")
  private String paymentMethod;

  @Size(max = 50, message = "采购币种长度不能超过20")
  @ExcelProperty(value = "采购币种")
  private String purchaseCurrency;

  @Size(max = 50, message = "运费长度不能超过20")
  @ExcelProperty(value = "运费")
  private java.math.BigDecimal shippingPrice;

  @ExcelProperty(value = "其它费用")
  private java.math.BigDecimal otherCurrency;

  @EnumsString(
    value = { " 不分摊", "按金额", " 按数量" },
    message = "费用分摊方式的可用值为 “ 不分摊”, “按金额”, “ 按数量” 其中之一"
  )
  @ExcelProperty(value = "费用分摊方式")
  private String feePartType;

  @EnumsString(
    value = { "否", "是" },
    message = "含税的可用值为 “否”, “是” 其中之一"
  )
  @ExcelProperty(value = "含税")
  private String includingTax;

  @ExcelProperty(value = "采购员")
  private String optUidName;

  @ExcelIgnore
  @ExcelProperty(value = "采购员")
  private Long optUid;

  @ExcelProperty(value = "单据负责人")
  private String oversightUidName;

  @ExcelIgnore
  @ExcelProperty(value = "单据负责人")
  private List<Long> oversightUid;

  @EnumsString(
    value = { "仓库质检", "预检", "免检" },
    message = "质检类型的可用值为 “仓库质检”, “预检”, “免检” 其中之一"
  )
  @Size(max = 50, message = "质检类型长度不能超过20")
  @ExcelProperty(value = "质检类型")
  private String inspectionType;

  @Size(max = 50, message = "备注长度不能超过20")
  @ExcelProperty(value = "备注")
  private String remarks;

  @Size(max = 50, message = "总金额长度不能超过20")
  @ExcelProperty(value = "总金额")
  private String totalPrice;

  @Size(max = 50, message = "到货量长度不能超过20")
  @ExcelProperty(value = "到货量")
  private String quantityReceived;

  @Size(max = 50, message = "组织长度不能超过20")
  @ExcelProperty(value = "组织")
  private String orgIdName;

  @ExcelIgnore
  @ExcelProperty(value = "组织")
  private Long orgId;

  @Size(max = 50, message = "状态长度不能超过20")
  @ExcelProperty(value = "状态")
  private String stauts;

  @NotNull(message = "采购日期不能为空")
  @DateTimeFormat("yyyy年MM月dd日")
  @ExcelProperty(value = "*采购日期")
  private java.util.Date purchasesDate;

  @ExcelProperty(value = "采购数量")
  private String purchaseQuantity;

  @EnumsString(
    value = {
      "作废",
      "待提交",
      "待下单",
      "待到货",
      "完成",
      "待审核(审批流)",
      "驳回(审批流)",
      "作废(审批流)",
    },
    message = "审批状态的可用值为 “作废”, “待提交”, “待下单”, “待到货”, “完成”, “待审核(审批流)”, “驳回(审批流)”, “作废(审批流)” 其中之一"
  )
  @ExcelProperty(value = "审批状态")
  private String aStatus;
}
